
import random

def sortAarray(nums):
    
    if not nums:
        return nums
    smaller = []
    equal = []
    greater = []
    pivot = random.choice(nums)
    for x in nums:
        if x < pivot:
            smaller.append(x)
        elif x == pivot:
            equal.append(x)
        else:
            greater.append(x)
    return sortAarray(smaller) + equal + sortAarray(greater)

nums = [5, 2, 2, 3, 4]
print(sortAarray(nums))

class init:
    def __init__(self, x, y):
        y = [1, 2, 3]











class id:
    def __init__(self, x,):
        return x

    def __good__(self, x):
        return x == 1

    
        
